﻿<UserControl x:Class="_3.Students.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <UserControl.Resources>
        <!--<Style TargetType="controls:TabItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="controls:TabItem">
                        <Border 
                            Name="Border"
                            Background="AliceBlue"
                            BorderBrush="Purple"
                            BorderThickness="1,1,1,1">
                            <StackPanel Orientation="Horizontal">
                                <Image Source="/3.Students;component/logo_tu.jpg" Width="10" Height="10"></Image>
                                <TextBlock Text="TY" Width="16"></TextBlock>
                                <ContentPresenter x:Name="ContentSite"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"  
                                        Margin="12,2,12,2"
                                        Content="{TemplateBinding Header}" />
                            </StackPanel>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>-->
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">
        <sdk:TabControl Height="223" HorizontalAlignment="Left" Margin="12,12,0,0"
                        Name="tabControlStudents" VerticalAlignment="Top" Width="352">
            <sdk:TabItem Header="Add student">
                <Grid Height="161" Width="203">
                    <TextBlock Height="20" Margin="40,11,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70">First name:</TextBlock>
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="110,11,0,0" Name="TextBoxFirstName" VerticalAlignment="Top" Width="80" />
                    <TextBlock Height="20" HorizontalAlignment="Left" Margin="40,40,0,0" VerticalAlignment="Top" Width="70">Last name:</TextBlock>
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="110,40,0,0" Name="TextBoxLastName" VerticalAlignment="Top" Width="80" />
                    <TextBlock Height="20" HorizontalAlignment="Left" Margin="10,70,0,0" VerticalAlignment="Top" Width="90">Faculty number:</TextBlock>
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="110,70,0,0" Name="TextBoxFacNumber" VerticalAlignment="Top" Width="80" />
                    <TextBlock Height="20" HorizontalAlignment="Left" Margin="70,103,0,0" VerticalAlignment="Top" Width="40">Mark:</TextBlock>
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="110,100,0,0" Name="TextBoxMark" VerticalAlignment="Top" Width="80" />
                    <Button Content="Add" Height="25" Margin="82,129,0,0" Name="ButtonAdd" VerticalAlignment="Top" Width="50" HorizontalAlignment="Left" Click="ButtonAdd_Click" />
                    <Button Content="Clear" Height="25" Margin="140,129,0,0" Name="ButtonClear" VerticalAlignment="Top" HorizontalAlignment="Left" Width="50" Click="ButtonClear_Click" />
                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="Marks">
                <Canvas>
                    <TextBlock Canvas.Left="62" Canvas.Top="27">Maximum:</TextBlock>
                    <TextBox x:Name="TextBoxMaximum" Width="50" Height="20" Text="NaN"
                             Canvas.Left="126" Canvas.Top="23" IsEnabled="False"></TextBox>
                    <TextBlock Canvas.Left="65" Canvas.Top="61">Minimum:</TextBlock>
                    <TextBox x:Name="TextBoxMinimum" Width="50" Height="20" Text="NaN"
                             Canvas.Top="57" Canvas.Left="126" IsEnabled="False"></TextBox>
                    <TextBlock Canvas.Left="70" Canvas.Top="92">Average:</TextBlock>
                    <TextBox Canvas.Left="126" Canvas.Top="88" Height="20" IsEnabled="False" 
                             Name="TextBoxAverage" Text="NaN" Width="50" />
                    <TextBlock Canvas.Top="122" Canvas.Left="6">Number of students:</TextBlock>
                    <TextBox x:Name="TextBoxNumberStudents" Width="50" Height="20" Text="0"
                             Canvas.Top="118" Canvas.Left="126" IsEnabled="False"></TextBox>                    
                </Canvas>
            </sdk:TabItem>   
            <sdk:TabItem Header="All students">
                <Canvas>
                    <sdk:DataGrid x:Name="DataGridStudents" AutoGenerateColumns="True" 
                        ItemsSource="{Binding}" VerticalScrollBarVisibility="Visible" 
                                  Height="150" IsReadOnly="True">
                    </sdk:DataGrid>
                <Button x:Name="ButtonDelete" Width="50" Height="20" Content="Delete" Canvas.Top="150" Canvas.Left="0" Click="ButtonDelete_Click"></Button>
                </Canvas>
            </sdk:TabItem>
        </sdk:TabControl>
    </Grid>
</UserControl>
